<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>后台管理模板</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="format-detection" content="telephone=no">
		<link rel="stylesheet" href="../../layui/css/layui.css" media="all" />
		<link rel="stylesheet" href="../../css/global.css" media="all">
		<link rel="stylesheet" type="text/css" href="http://www.jq22.com/jquery/font-awesome.4.6.0.css">
		<link rel="stylesheet" href="../../datatables-plugins/integration/bootstrap/3/dataTables.bootstrap.css">
		<style type="text/css">
			.deinfo {
				font-size: 20px;
				margin: 20px ;

				margin-left: 50px;
			}
			.deinfo div {
				margin-bottom: 10px;
			}
		</style>
	</head>
	<body>
		<div class="layui-layout layui-layout-admin" style="border-bottom: solid 5px #1aa094;">
			<!--头部导航-->
			<div class="layui-header header header-demo" ></div>
			<!--左侧导航-->
			<div class="layui-side layui-bg-black" id="admin-side">
			</div>
			<!--右侧具体内容-->
			<div class="layui-body" style="bottom: 0;border-left: solid 2px #1AA094;padding:20px" id="admin-body">
				<div class="title">编辑个人资料</div>
				<hr/>

				<div style="margin:20px 60px">
					<div class="info-content">
						<div style=""><img src="../../images/demo1.png" style="margin:40px 10px;width: 80px;margin-left: 50px" id="adminUrlpf"></div>
						<div class="deinfo">
							<div>编号：<label id="adminIdpf">120012</label></div>
							<div>姓名：<label id="adminNamepf">czl</label></div>
							<div>类型：<label id="adminPowerpf">超级管理员</label></div>
							<div>性别：<label id="adminSexpf">女</label></div>
						</div>
						<a href="editpersoninfo.html"><div class="layui-btn layui-btn-warm " style="margin: 30px 50px">编辑</div></a>
					</div>
				</div>
			</div>
			<!--底部导航-->
			<div class="layui-footer footer footer-demo" id="admin-footer"></div>
			<!--JS模块-->
			<script type="text/javascript" src="../../layui/layui.js"></script>
			<script src="../../js/jquery-1.12.3.min.js"></script>

			<script type="text/javascript" src="../../js/jquery.cookie.js"></script>
			<script src="../../js/index.js"></script>
			<script type="text/javascript">
			$(document).ready(function() {
				/*var data = {
					"code": 200,
					"admin": {
						"adminId": 100124,
						"adminSex": "女",
						"adminName": "hwjlmn",
						"adminPower": 0,
						"adminUrl": "../../images/6.jpg",
						"adminNickname": "hwjlmn"
					}
				}*/
				alert($.cookie('adminId'));
				$.ajax({
					type: "get",
					url: "/randomdelivery/AdminController/Admin/"+$.cookie('adminId'),
					data: {},
					async: true,
					dateType: "json",
					contentType: "application/json",
					success: function(data) {personinfo(data)},
					Error: function() {
						alert("服务器出错");
					}
				})
			
				function personinfo(data) {
					$("#adminUrlpf").attr({
						src: data.admin.adminUrl,
					});
					$("#adminIdpf").text(data.admin.adminId)
					$("#adminNamepf").text(data.admin.adminName)
					$("#adminSexpf").text(data.admin.adminSex)
					if (data.admin.adminPower==0) {
					$("#adminPowerpf").text("普通管理员")
					} else {
						$("#adminPowerpf").text("超级管理员")
					}
				}
				adminCookie()

			});
			</script>
		</div>
	</body>
</html>